﻿using Microsoft.WindowsAzure.Storage.Table;
using Microsoft.WindowsAzure.Storage.Table.DataServices;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace POC.Azure.Model
{
    public class SessionStateEntity : TableServiceEntity
    {
        public SessionStateEntity(string partitionKey, string rowKey)
            : base(partitionKey, rowKey)
        {
            PartitionKey = partitionKey;
            RowKey = string.IsNullOrEmpty( rowKey) ? Guid.NewGuid().ToString(): rowKey;
        }

        public SessionStateEntity()
            : this(Guid.NewGuid().ToString(), Guid.NewGuid().ToString())
        {
            
        }

        public string ApplicationName { get; set; }
        public DateTime Expires { get; set; }
        public DateTime LockDate { get; set; }
        public int LockId { get; set; }
        public int TimeOut { get; set; }
        public bool Locked { get; set; }
        public string SessionItems { get; set; }
        public int Flags { get; set; }

    }
}
